package com.yuanfeng.authserver.feign;

import com.yuanfeng.commoms.util.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "mall-base", url = "http://localhost:8011")
public interface BaseServiceClient {

    /**
     * 查询积分规则
     *
     * @return
     */
    @PostMapping("/base/integralRules/queryIntegralRules")
    ResponseResult queryIntegralRules();


    /**
     * 根据用户id查询会员等级id
     * @param userId
     * @return
     */
    @PostMapping("/base/tagClass/queryByUserId")
    ResponseResult getMemberClassIdByUserId(@RequestParam("userId") String userId);



    /**
     * 根据会员等级id查询会员等级
     * @param id
     * @return
     */
    @PostMapping("/base/membershipGrade/getMemberNameByClassId")
    ResponseResult getMemberNameByClassId(@RequestParam("id") String id);


    /**
     * 根据configKey查configValue
     *
     * @param configKey
     * @return
     */
    @GetMapping("/base/sysConfig/selectByConfigKey")
    ResponseResult selectByConfigKey(@RequestParam("configKey") String configKey);
}
